package icu.twtool.constant

import java.time.LocalDateTime
import java.time.format.DateTimeFormatter


val DATE_TIME_FORMAT: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")

fun LocalDateTime.parse(): String = format(DATE_TIME_FORMAT)

fun String.toDateTime(): LocalDateTime = LocalDateTime.parse(this.substring(0, 19), DATE_TIME_FORMAT)